package com.hmxx.myblogproject.controller;

import com.hmxx.myblogproject.entity.MyBlogFollow;
import com.hmxx.myblogproject.service.MyBlogFollowService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * @description:
 * @Author: {27106}
 * @Date: {2021/11/25 10:30}
 */
@RestController
@RequestMapping("/follow")
public class MyBlogFollowController {
    @Resource
    private MyBlogFollowService followService;


    @PostMapping("/setFollow")
    public Object setFollow(@RequestBody MyBlogFollow myBlogFollow){
        return followService.setFollow(myBlogFollow);
    }

    @PostMapping("/getFollowStatus")
    public Object getFollowStatus(@RequestBody MyBlogFollow myBlogFollow){
        return followService.getFollowStatus(myBlogFollow);
    }

    @GetMapping("/getFollow")
    public Object getFollow(HttpServletRequest request){
        return followService.getFollow(request);
    }
}
